---------------------------------------------------------------
File name   :  vv_ahblite_env.e
Title       :  Env unit implementation
Project     :  vv_ahblite eVC
Developers  :  stefan,filip
Created     :  27.07.2011.
Description :  This file implements the environment unit.
Notes       :  
---------------------------------------------------------------
Copyright  (c)2011
---------------------------------------------------------------

<'

package vv_ahblite;

-- ==========================================================================
-- Env unit implementation.
-- ==========================================================================
extend vv_ahblite_env {
	

    -- Show the current status of the eVC.
    show_status() is only {
        bus_monitor.show_status();
  --    master.agent_monitor.show_status();
   --   for each in slaves {
   --     it.agent_monitor.show_status();
  --};
    };
    

    -- Report the final status at the end of the test.
    finalize() is also {
        message(LOW, "\nTest done:");
        show_status();
    }; 
    
    -- Print a banner for each UVC instance at the start of the test.
    show_banner() is also {
        out("\n(c)  2011");
        out("Bus : ", name);
        if master.active_passive == ACTIVE {
            out("     ACTIVE master");
        } else {
            out("     PASSIVE master");
        };
	        out("     ", 
            dec(slaves.count(.active_passive == ACTIVE)), 
            " ACTIVE slaves");
        out("     ", 
            dec(slaves.count(.active_passive == PASSIVE)), 
            " PASSIVE slaves");
    };  
   
}; 

'>
